package com.xiaoxing.zhinenghuacangku_linyi.di.module;

import com.jess.arms.di.scope.ActivityScope;
import com.xiaoxing.zhinenghuacangku_linyi.mvp.contract.LinYi_OutOfTheLibraryContract;
import com.xiaoxing.zhinenghuacangku_linyi.mvp.model.LinYi_OutOfTheLibraryModel;

import dagger.Module;
import dagger.Provides;


@Module
public class LinYi_OutOfTheLibraryModule {
    private LinYi_OutOfTheLibraryContract.View view;

    /**
     * 构建OutOfTheLibraryModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public LinYi_OutOfTheLibraryModule(LinYi_OutOfTheLibraryContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    LinYi_OutOfTheLibraryContract.View provideOutOfTheLibraryView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    LinYi_OutOfTheLibraryContract.Model provideOutOfTheLibraryModel(LinYi_OutOfTheLibraryModel model) {
        return model;
    }
}